import { useCallback } from 'react';
import { throttle } from 'lodash';
import { clearJump } from '@/utils/navigator';
import { Button, Result } from 'antd';

export default function () {
  const backHome = useCallback(
    throttle(function () {
      clearJump('/');
    }, 300),
    [],
  );
  return (
    <Result
      status="404"
      title="404"
      subTitle="对不起，该功能正在实现中。"
      extra={
        <Button type="primary" onClick={backHome}>
          返回主页
        </Button>
      }
    />
  );
}
